import 'package:flutter/material.dart';
import '../../components/copyright_info.dart';

class AboutScreen extends StatelessWidget {
  const AboutScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('关于应用'),
        centerTitle: true,
      ),
      body: SingleChildScrollView(
        padding: const EdgeInsets.all(16),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const CopyrightInfo(),
            const SizedBox(height: 24),
            _buildTechStackSection(),
          ],
        ),
      ),
    );
  }

  Widget _buildTechStackSection() {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        const Text(
          '技术架构',
          style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
        ),
        const SizedBox(height: 12),
        _buildTechItem('Flutter 3.22.2', '跨平台开发框架'),
        _buildTechItem('Provider 6.1.1', '状态管理'),
        _buildTechItem('Dio 5.4.0', '网络请求'),
        _buildTechItem('Hive 2.2.3', '本地数据存储'),
        const SizedBox(height: 12),
        const Text(
          '项目特性',
          style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
        ),
        const Padding(
          padding: EdgeInsets.symmetric(vertical: 8),
          child: Text('• 四级行政区划选择器\n• 全球城市数据展示\n• 智能搜索功能'),
        ),
      ],
    );
  }

  Widget _buildTechItem(String title, String subtitle) {
    return ListTile(
      contentPadding: EdgeInsets.zero,
      leading: const Icon(Icons.code, color: Colors.blue),
      title: Text(title),
      subtitle: Text(subtitle),
    );
  }
}
